<?php
/**
 * DynaGrid - The PHP datagrid
 *
 * @package    DynaGrid
 * @author     $Author: keesschepers $
 * @version    $Id: Grid.php 11 2011-02-11 23:20:17Z keesschepers $
 */


include_once 'DataSource/Adapter/Abstract.php';

class DynaGrid_DataSource_Adapter_Zend extends DynaGrid_DataSource_Adapter_Abstract implements DynaGrid_DataSource_Adapter_Interface {
	protected $offset;
	protected $limit;

	const ARG_ADAPTER = 0;
  const ARG_QUERY = 1;
    
	/**
	 *
	 * Safely check if given arguments are childs of Zend_db_Adapter_Abstract and Zend_Db_Select
	 *
	 * @param array $arguments
	 * @return void
	 */
	public function  setArguments($arguments = array()) {
			if(!is_array($arguments) ||
				 !$arguments[self::ARG_ADAPTER] instanceof Zend_Db_Adapter_Abstract ||
				 !$arguments[self::ARG_QUERY] instanceof Zend_Db_Select) {

					throw new DynaGrid_Exception('Arguments are in invalid sequence or from invalid type.');
			}

			parent::setArguments($arguments);
	}
	/**
	 * Set the offset for the current query
	 */
	public function setOffset($offset) {
		$this->offset = $offset;
	}
	public function  getTotalRows() {

	}

}

?>
